package com.unohacha.qqj.fzdr.personal.presenter;

import com.unohacha.qqj.fzdr.personal.model.VerifyCodeImpl;
import com.unohacha.qqj.fzdr.personal.view.IChangePasswordView;

public class ChangePasswordPresenter implements IChangePasswordPresenter, IVerifyCode, IChangeMobile {

    private IChangePasswordView iChangePasswordView;
    private VerifyCodeImpl verifyCodeImpl;

    public ChangePasswordPresenter(IChangePasswordView iChangePasswordView) {
        this.iChangePasswordView = iChangePasswordView;
        verifyCodeImpl = new VerifyCodeImpl(this);
    }

    @Override
    public void sendVerifyCode(String typeid, String mobile) {
        verifyCodeImpl.sendVerifyCode(typeid, mobile);
    }

    @Override
    public void sendVerifyCodeSuccess(String data) {
        iChangePasswordView.sendVerifyCode(data);
    }

    @Override
    public void changPassword(String oldPassword, String newPassword, String mobile) {

    }

    @Override
    public void changeMobile(String mobile, String verifyCode) {
        iChangePasswordView.ChangeSuccess();
    }
}
